<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/base.css">
    <link rel="stylesheet" href="./css/login.css">
</head>

<body>
    <div class="container">
        <header>
            <div id="header">
                <a href="javascript:history.go(-1)"></a>
                <h1>登录</h1>
                <a href="./register.html">注册</a>
            </div>
        </header>

        <div class="middle">
            <h1><a href="">天眼购吧</a></h1>
            <ul>
                <li>
                    <p>账号&nbsp; :</p>
                    <input type="text" placeholder="请输入账号" id="inp_one">
                </li>
                <li>
                    <p>密码&nbsp; :</p>
                    <input type="text" placeholder="请输入密码" id="inp_two">
                </li>
                <li>
                    <span id=ospan></span>
                    <span>已阅读并同意以下协议:</span>
                    <a href="./userdeal.html">用户协议及隐私协议</a>
                    <a href="./changepass.html">忘记密码?</a>
                </li>
                <li><input type="button" value="登&nbsp; 录" id="oinp"></li>
            </ul>

            <!-- 登录方式 -->
            <div>
                <h2>使用第三方登录</h2>
                <p>微信登录</p>
                <p>支付宝登录</p>
            </div>

        </div>
        <div class="odiv" id="odiv_one"  style="display: none;">
            <div>
                <p>账号未注册或密码错误</p>
                <p>
                    <span class="onespan">确定</span>
                    <span>
                        <a href="./register.html">注册</a>
                        <a href="./changepass.html">更改密码</a>
                    </span>

                </p>
            </div>

        </div>
        <div class="odiv" id="odiv_two" style="display: none;">
            <div>
                <p>登陆成功</p>
                <p> 
                    <a href="./usercenter.html" class="oa">确定</a>
                </p>
            </div>
        </div>



    </div>
    <script>
        function oinpclick() {
            var oinp = document.getElementById('oinp');
            var inp_one = document.getElementById('inp_one');
            var inp_two = document.getElementById('inp_two');
            var odiv_one = document.getElementById('odiv_one');
            var odiv_two = document.getElementById('odiv_two');
            var odiv_three = document.getElementById('odiv_three');
            var onespan = document.getElementsByClassName('onespan');

            oinp.onclick = function () {
                console.log(inp_two.value);
                if ((inp_one.value == '123') && (inp_two.value == 'abc')) {
                    odiv_two.style.display="block"
                }else{
                    odiv_one.style.display="block"
                }

            }
            console.log(onespan[0]);
            onespan[0].onclick = function (){
                odiv_one.style.display = "none";
            }



        }
        oinpclick()
    </script>




    <script src="./js/login.js"></script>
    <script src="./js/rem.js"></script>
</body>

</html>